import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';

function render(){
  ReactDOM.render(
    <React.StrictMode>
      <App />
    </React.StrictMode>,
    document.getElementById('root')
  );
}

// 默认独立运行
if (!window.__POWERED_BY_QIANKUN__) {
  render();
}

export async function bootstrap(props){
  console.log('vue bootstrap props', props)
  console.log(`主基座num的值是${props.data.state.num}, ${props.utils.prototype.hello('react')}`)
}

export async function mount(props){
  render()
}

export async function unmount(props){
  ReactDOM.unmountComponentAtNode(document.getElementById('root'))
}
